🌎 rns.kin.earth git 🌍
Commit e29b839429b8aa98265a4146d85e888374037c33
Parents : 12c21d4
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-07-24T19:47:44+02:00
Ensure historical interface discoveries are cleaned according to blackholed identities
Changes
Diff
diff --git a/RNS/Discovery.py b/RNS/Discovery.py
index c0b89bdd..578e33bd 100644
--- a/RNS/Discovery.py
+++ b/RNS/Discovery.py
@@ -467,13 +467,17 @@ class InterfaceDiscovery():
with open(filepath, "rb") as f: info = msgpack.unpackb(f.read())
should_remove = False
- heard_delta = now-info["last_heard"]
- info["name"] = InterfaceAnnounceHandler.sanitize_name(info["name"])
+ heard_delta = now-info["last_heard"]
+ info["name"] = InterfaceAnnounceHandler.sanitize_name(info["name"])
- if heard_delta > self.THRESHOLD_REMOVE: should_remove = True
+ if heard_delta > self.THRESHOLD_REMOVE: should_remove = True
+ elif not "transport_id" in info or not info["transport_id"]: should_remove = True
+ elif not "network_id" in info or not info["network_id"]: should_remove = True
elif discovery_sources and not "network_id" in info: should_remove = True
elif discovery_sources and not bytes.fromhex(info["network_id"]) in discovery_sources: should_remove = True
elif not "type" in info or ("type" in info and not info["type"] in self.DISCOVERABLE_TYPES): should_remove = True
+ elif self.rns_instance.is_blackholed(bytes.fromhex(info["network_id"])): should_remove = True
+ elif self.rns_instance.is_blackholed(bytes.fromhex(info["transport_id"])): should_remove = True
elif "reachable_on" in info:
if not (is_ip_address(info["reachable_on"]) or is_hostname(info["reachable_on"])): should_remove = True
Served by rngit 1.5.0 - Generated in 0.04s